import React from 'react'

class NewsPushTools extends React.Component {

  constructor(props) {
    super(props)
  }

  render() {
    var title = "多图文推送";
    if (this.props.thisMonth) {
      var count = parseInt(this.props.thisMonth.count)
      if (!isNaN(count)) {
        title += " 本月已推送"+count+"次, 还剩余"+(4-count)+"次";
      }
    }
    return (
      <div className="demo-setting-tools billboard-setting-tools row">
        <div className="col-sm-4">
          <label className="">{title}</label>
        </div>
        <div className="col-sm-offset-4 col-sm-4 create-button">
          <button type="button" className="btn-createBoard"
                  onClick={(event)=>this.props.onCreateNewsPushClick()}><i className="ti-file"></i>新建推送</button>
        </div>

      </div>
    )
  }

}

export default NewsPushTools
